package cn.minimelon.api.service.data.factory;

import cn.hutool.core.util.StrUtil;
import cn.minimelon.api.service.data.ModelDeployService;
import org.noear.solon.annotation.Component;
import org.noear.solon.annotation.Inject;

@Component
public class TopicRecFactory {
    @Inject
    private ModelDeployService modelDeployService;

    public TopicConsumer getConsumer(String topic) {
        if (StrUtil.equals(topic, "model:deploy")) {
            return new ModelDeployConsumer(modelDeployService);
        } else {
            return new FlowableConsumer();
        }
    }
}
